package com.power.sifa.approve.model.doc;

import cn.hutool.extra.spring.SpringUtil;
import com.power.sifa.approve.model.*;
import com.power.sifa.approve.model.enumeration.Tp_procmaterial;
import com.power.sifa.approve.service.*;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @ClassName DocFactory
 * @Author xiongzw
 * @Date 2023/11/23 13:38
 * @Description
 * @Version: 1.0
 **/

@Data
@Component
public class DocFactory {

    public AbstractDoc createDoc(String applyid, Integer docType) {
        AbstractDoc doc;
         switch (docType) {
             case Tp_procmaterial.ADMRE_ACCEPT:
                 // 行政复议申请受理通知书
                 doc = new AdmreAuditAcceptNoticeDoc(applyid);
                 doc.initDocParam(applyid);
                 return doc;
             case Tp_procmaterial.ADMRE_REPLY:
                 // 行政复议答复通知书
                 doc = new AdmreAuditAcceptReplyDoc(applyid);
                 doc.initDocParam(applyid);
                 return doc;
             case Tp_procmaterial.ARRIVE_INFORM:
                 // 行政复议告知书
                 doc = new AdmreAuditNotificationDoc(applyid);
                 doc.initDocParam(applyid);
                 return doc;
             case Tp_procmaterial.ADMRE_APPEND:
                 // 补正行政复议申请通知书
                 doc = new AdmreAuditAppendNoticeDoc(applyid);
                 doc.initDocParam(applyid);
                 return doc;
             case Tp_procmaterial.ADMRE_NOACCEPT:
                 // 不予受理行政复议申请决定书 - 需要进行特殊处理 查询代理人
                 AdmreAuditNoacceptDecisionDoc noAcceptDecisionDoc = new AdmreAuditNoacceptDecisionDoc(applyid);
                 noAcceptDecisionDoc.initDocParam(applyid);
                 return noAcceptDecisionDoc;
             /***************审理******************/
             case Tp_procmaterial.HEAR_STOP:
                 // 停止执行行政行为通知书
                 doc = new HearAuditStopDoc(applyid);
                 doc.initDocParam(applyid);
                 return doc;
             case Tp_procmaterial.HEAR_HEARING:
                 // 行政复议听证通知书
                 doc = new HearAuditHearingDoc(applyid);
                 doc.initDocParam(applyid);
                 return doc;
             case Tp_procmaterial.HEAR_DELAY:
                 // 延期审理通知书
                 doc = new HearAuditDelayDoc(applyid);
                 doc.initDocParam(applyid);
                 return doc;
             case Tp_procmaterial.HEAR_RESTORE:
                 // 恢复审理通知书
                 doc = new HearAuditRestoreDoc(applyid);
                 doc.initDocParam(applyid);
                 return doc;

             case Tp_procmaterial.HEAR_HANGUP:
                 // 中止行政复议通知书
                 doc = new HearAuditHangupDoc(applyid);
                 doc.initDocParam(applyid);
                 return doc;
             case Tp_procmaterial.HEAR_TERMIN:
                 // 行政复议终止决定书
                 doc = new HearAuditTerminDoc(applyid);
                 doc.initDocParam(applyid);
                 return doc;
             case Tp_procmaterial.HEAR_DECISION:
                 // 行政复议终止决定书
                 doc = new HearAuditDecisionDoc(applyid);
                 doc.initDocParam(applyid);
                 return doc;
             case Tp_procmaterial.HEAR_REJECT:
                 // 驳回行政复议申请决定书
                 doc = new HearAuditRejectDoc(applyid);
                 doc.initDocParam(applyid);
                 return doc;

             /***************执行******************/
             case Tp_procmaterial.HEAR_REMINDER:
                 // 履行行政复议决定催告书
                 doc = new ExecuteAuditReminderDoc(applyid);
                 doc.initDocParam(applyid);
                 return doc;
             case Tp_procmaterial.HEAR_PERFORM:
                 // 责令履行行政复议决定通知书
                 ExecuteAuditPerformDoc executeAuditPerformDoc = new ExecuteAuditPerformDoc(applyid);
                 executeAuditPerformDoc.initDocParam(applyid);
                 return executeAuditPerformDoc;
             case Tp_procmaterial.ARRIVE_FORCE:
                 // 行政复议强制执行决定书
                 doc = new ExecuteAuditForceDoc(applyid);
                 doc.initDocParam(applyid);
                 return doc;
             case Tp_procmaterial.ARRIVE_PUNISH:
                 // 政务处分建议书
                 doc = new ExecuteAuditPunishDoc(applyid);
                 doc.initDocParam(applyid);
                 return doc;
             default:
                return null;
         }
    }


}
